package com.xlf.controller.client;

import com.xlf.service.TypeService;
import com.xlf.utils.ResponseResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 前台小程序菜单控制层
 */
@Tag(name = "前台小程序菜单控制层")
@RestController
@RequestMapping("/client/menu")
public class ClientMenuController {


    @Resource
    TypeService typeService;

    /**
     * 获取前台分类列表下的各商品
     * @return  返回前台菜单中的分类信息及其下的商品数据
     */
    @Operation(summary = "获取前台分类列表下的各商品")
    @GetMapping("/getFoodsList")
    public ResponseResult getFoodsList(){
        return ResponseResult.success("获取menu成功", typeService.getFoodsList());
    }
}
